package com.zty.xiaomi.server.Mapper;

import com.zty.xiaomi.server.Entity.Evidence.Evidence;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface EvidenceMapper {

    @Insert("insert into evidence (tribunal_id,evidence_font,evidence_img,createtime,status) values(#{tribunal_id}," +
            "#{evidence_font},#{evidence_img},NOW(),#{status})")
    int addEvidenceByTribunalId(Evidence evidence);

    @Select("select evidence_id,tribunal_id,evidence_font,evidence_img,createtime,status from evidence" +
            " where tribunal_id = #{tribunal_id}")
    List<Evidence> getEvidenceByTribunalId(int tribunal_id);
}
